<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta content="telephone=no" name="format-detection" />
    <!-- 留作将来统一添加 -->
    <TEMPLATE>${TEMPLATE}</TEMPLATE>
    <title>模板html</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/index.css">
    <link rel="stylesheet" type="text/css" href="../../css/data-flex.min.css">
    <style type="text/css">
        body {
            background:rgba(255,255,255,1);
        }

        .vueApp {
            overflow: hidden;
        }

        .m-info-mod {
            margin: 15px;
        }

        .c-info-title {
            font-size:18px;
            font-weight:bold;
            color:rgba(25,25,25,1);
            line-height:30px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

        .c-info-time {
            margin-top: 5px;
            height:12px;
            font-size:12px;
            font-weight:400;
            color:rgba(128,128,128,1);
            line-height:12px;
        }

        .c-info-img {
            width: 100%;
            height: 200px;
            border-radius:8px;
            margin-top: 20px;
        }

        .c-info-content {
            margin-top: 10px;
            font-size:15px;
            font-weight:400;
            color:rgba(25,25,25,1);
            line-height:25px;
        }
    </style>
</head>
<body>
    <div class="vueApp" v-cloak>
        <div class="m-info-mod">
            <div class="c-info-title">
                {{ info.title }}
            </div>
            <div class="c-info-time">
                {{ info.readTime }}
            </div>
            <!-- <img class="c-info-img" :src="img" alt=""> -->
            <div class="c-info-content" v-html="info.context"></div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/service/service-tool.js"></script>
<script type="text/javascript" src="../../script/service/service-app.js"></script>
<script type="text/javascript" src="../../script/service/service-user.js"></script>
<script type="text/javascript" src="../../script/service/service-logic.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript">
    // html 的引号一律为双引号(""),js 为单引号('')
    var USER, $S, vm, pageParam;
    apiready = function(){
        $S = SERVICE();
        USER = USER();
        pageParam = api.pageParam;
        console.log(JSON.stringify(api.pageParam) + '=====pageParam');
        fnInit();
    };
    // 初始化
    function fnInit() {
        vm = new Vue({
            el: '.vueApp',
            data: {
                info: {}
            }
        });
        getPageData();
    }


    // 根据传过来的消息ID获取数据
    function getPageData() {
        var url = 'apiAppMessage/findUserMessageDetails';
        var params = {
            'messageInfoId': pageParam.messageInfoId
        };
        var callback = function(data) {
            data.readTime = formatTime(data.readTime,'order_date');
            vm.info = data;
        }
        POST(url, params, callback);
    }
</script>
</html>